import 'package:flutter/cupertino.dart';

///登录接口请求参数
class LoginParams {
  String expired;
  String mid;
  String pwd;
  String sn;

  LoginParams({this.expired, this.mid, this.pwd, this.sn});

  factory LoginParams.fromJson(Map<String, dynamic> json) {
    return LoginParams(
      expired: json['expired'],
      mid: json['mid'],
      pwd: json['pwd'],
      sn: json['sn'],
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['expired'] = this.expired;
    data['mid'] = this.mid;
    data['pwd'] = this.pwd;
    data['sn'] = this.sn;
    return data;
  }
}

///外带接口请求参数
class TakeOutParams {
  String page;
  String shop_id;
  String type;

  TakeOutParams({this.page = "1", this.shop_id, this.type = "1"});

  factory TakeOutParams.fromJson(Map<String, dynamic> json) {
    return TakeOutParams(
      page: json['page'],
      shop_id: json['shop_id'],
      type: json['type'],
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['page'] = this.page;
    data['shop_id'] = this.shop_id;
    data['type'] = this.type;
    return data;
  }
}
